﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Acceron.University.DBAccess;

namespace GA_Scheduler
{
    public static class Extensions
    {
        public static bool ProfessorOverlaps(this Class prof, Class current)
        {
            return false;
            //return prof.Professor.Prof_ID == current.Professor.Prof_ID;
        }

        public static bool GroupsOverlap(this Class gr, Class current)
        {
            var grcl = gr.GroupClasses;
            foreach(var g in grcl)
            {
                if (current.GroupClasses.Contains(g))
                    return true;
            }

            return false;
        }

        public static int NumberOfSeats(this Class cl)
        {
            var groups = cl.GroupClasses;
            int totalSize = 0;
            foreach (var gr in groups)
            {
               // totalSize += gr.Group.Size;
            }

            return totalSize;
        }
    }
}
